package com.cz.basetool.ui_work.util.safe;

import android.util.Log;

import com.util.JxDesCryUtil;

import java.io.UnsupportedEncodingException;

/**
 * 数据加密
 * @author jkj
 */
public class FileEncrypter {
	public static String encrypt(String strMingWenData){
		String strKeyCrypt = "11111111111111111111111111111111";
		String strKeyAuth = "22222222222222222222222222222222";
		String paramData;
		try {
/*			TaskExcuteTimeCutter taskExcuteTimeCutter  = new TaskExcuteTimeCutter("明文转HEX", strMingWenData.length());
			taskExcuteTimeCutter.start();*/
			paramData = JxDesCryUtil.AsciToHexString(strMingWenData);
/*			taskExcuteTimeCutter.end();*/
			return JxDesCryUtil.JavaEnCryptDataAndCalAuthCode(strKeyCrypt, strKeyAuth, paramData);
		} catch (UnsupportedEncodingException e) {
			// TODO Auto-generated catch block
			e.printStackTrace();
			Log.e("CZLog","密文生成失败：" + e.getMessage());
		}
		return "";
	}
}

